#ifndef YCBASECHECKLATESTVERSION_H
#define YCBASECHECKLATESTVERSION_H
#include <QDateTime>
#include <QHash>
#include <QList>
#include <QObject>

namespace yc {

class Service;

class CheckLatestVersion : public QObject
{
    Q_OBJECT

public:
    CheckLatestVersion(Service* service, const QString& upgrade_url, const QString& major_version,
                       const QString& full_version, const QDateTime& build_date,
                       const QString& local_file_name, int timeout, QObject* parent = nullptr);

Q_SIGNALS:
    void finished(bool new_version, bool necessary, const QString& major_version,
                  const QString& full_version, const QString& date);

private:
    void onDownloadXmlFinished();

    QString major_version_;
    QString full_version_;
    QDateTime build_date_;
    QString local_file_name_;
};

} // namespace yc

#endif // YCBASECHECKLATESTVERSION_H
